<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>


<%-- Centered Layout Tiles 
  This layout render a header, left tile, right tile, body and footer.
  It doesn't create <html> and <body> tag.
  @param header Header tile (jsp url or definition name)
  @param right Right center tile (optional)
  @param body Body or center tile
  @param left Left center tile (optional)
  @param footer Footer tile
  @param error Error tile
--%>
<tiles:importAttribute name="header" ignore="true"/>
<tiles:importAttribute name="footer" ignore="true"/>
<tiles:importAttribute name="left" ignore="true"/>
<tiles:importAttribute name="right" ignore="true"/>
<tiles:importAttribute name="error" ignore="true"/>

<table border="0" width="100%" cellspacing="5">
<logic:present name="header">
<tr>
  <td colspan="3"><tiles:insert attribute="header" /></td>
</tr>
</logic:present>

<tr>
  <logic:present name="right">
  <td width="140" valign="top">
    <tiles:insert attribute="right" ignore="true"/>
  </td>
  </logic:present>
  
  <td valign="top"  align="left">
  	<table border="0" width="100%" cellspacing="5">
  	    <logic:present name="error">
  		<logic:notEmpty name="error">
  		<tr>
  			<td ><tiles:insert attribute="error" /></td>
  		</tr>
  		</logic:notEmpty>
  		</logic:present>
  		<tr>
  			<td><tiles:insert attribute="body" /></td>
  		</tr>
  	</table>
  </td>
  
  <logic:present name="left">
  <td valign="top"  align="left">
    <tiles:insert attribute="left" ignore="true"/>
  </td>
  </logic:present>
</tr>

<logic:present name="footer">
<tr>
  <td colspan="3">
    <tiles:insert attribute="footer" />
  </td>
</tr>
</logic:present>

</table>

